<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>CSS Test: height:auto on region box with mulit-column layout</title>
    <link rel="author" title="Vincent Hardy, Adobe Systems" href="mailto:vhardy@adobe.com"/>
    <link rel="help" href="http://dev.w3.org/csswg/css3-regions/#rfcb-flow-fragment-height-resolution-phase-2"/>
    <link rel="match" href="regions-auto-size-6-ref.xht"/>
    <meta name="flags" content=""/>
    <meta name="assert" content=
    "The height of a region with height:auto is computed from the fragment content for a multi-column region as 
     for other regions. Here, the second region (rB) is a multi-column element with height:auto. Its flow fragment
     height should be computed such that it lays out the content of the second paragraph (because of the regions breaks)
     into its columns."/>
    <style>
    /*<![CDATA[*/
body {
    width: 800px;
    margin-left: auto;
    margin-right: auto;
}    

#article {
    -webkit-flow-into: article;
}

#article p {
    
    background: #e0e0e0;
}

#rA, #rB, #rC {
    -webkit-flow-from: article;
    padding: 0em;
    box-sizing: border-box;
    border: 1px solid #a0a0a0;
    width: 100%;
    margin-top: 2em;
}

#rA {
    height: auto;
}

#rB {
    height: auto;
    -webkit-column-count: 3;
}

#rC {
     height: auto;
}
/*]]>*/
</style>
</head>
<body>
    <p>You should see three gray boxes:</p>
    <ul>
        <li>the first box should read 'In first region'</li>
        <li>the second box should have three evenly spaced columns and read 'col 0', 'col 1', 'col 2' in each colum</li>
        <li>the third box should read 'In third region'</li>
    </ul>
    <div id="article">
        <p>In first region</p>
        <p style="-webkit-region-break-after:always;">In first region</p>
        <p style="-webkit-column-break-after: always;">In second region</p>
        <p >In second region</p>
        <p style="-webkit-region-break-after:always;">In second region</p>
        <p style="-webkit-region-break-after:always;">In third region</p>
    </div>
	<div id="rA"></div>
	<div id="rB"></div>
	<div id="rC"></div>
</body>
</html>